<script lang="ts" setup>
const examGauge = useMyExamGaugeStore();

const jumpToHref = (i: number) => {
  window.location.href = `#${i}`;
};
const isAnswered = (b: boolean) => {
  return b ? 'solid' : 'outline';
};
</script>

<template>
  <div>
    <p>
      答题进度
      <!-- {{ $route.path }} -->
    </p>
    <template v-for="(i, index) in examGauge.gauge" :key="index">
      <UButton
        class="w-[34px] h-[34px] m-2 justify-center"
        :ui="{
          body: {
            padding: tw`p-2`,
          },
        }"
        :variant="isAnswered(i.isTest)"
        @click="jumpToHref(i.eiid + 1)"
      >
        {{ i.eiid }}
      </UButton>
    </template>
  </div>
</template>

<style>

</style>
